import request from "@/utils/request.ts";
import type {MenuParam} from "@/api/acl/menu/type.ts";

export const reqGetAllPermission = () => request.get('/admin/acl/permission');
export const reqAddOrUpdatePermission = (data:MenuParam) => {
    if (data.id)
        return request.put('/admin/acl/permission/update',data);
    else
        return request.post('/admin/acl/permission/save',data);
}
export const reqRemoveMenu = (id:number)=>request.delete(`/admin/acl/permission/remove/${id}`)